import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import basicSsl from "@vitejs/plugin-basic-ssl"
import UnoCSS from "unocss/vite"

// https://vitejs.dev/config/
export default defineConfig(({command}) => {
    return {
        // Gitee pages路径配置
        base: command == "build" ? "/learn-english/" : "./",
        plugins: [basicSsl(), vue(), UnoCSS()],
        server: {
            host: true,
        },
        build: {
            // target: "esnext",
        },
        worker: {
            format: "es",
        },
    }
})
